package com.authine.cloudpivot.ext.domain.vo;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;


/**
 * Created with IntelliJ IDEA
 * User: Lee
 * Date: 2019/1/16
 * Time: 16:29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("企业商城商品信息VO")
public class ShopVo {

    @ApiModelProperty("商品ID")
    private Long id;
    @ApiModelProperty("报价单ID")
    private Long quotationId;//报价单ID
    @ApiModelProperty("定标选用理由")
    private String picketageReason;//定标选用理由
    @ApiModelProperty("客户SKU")
    private String customerSku;//客户SKU
    @ApiModelProperty("目录")
    private String catalog;//目录
    @ApiModelProperty("品牌")
    private String brand;//品牌
    @ApiModelProperty("商品名称")
    private String name;//商品名称
    @ApiModelProperty("型号")
    private String model;//型号
    @ApiModelProperty("规格")
    private String spec;//规格
    @ApiModelProperty("单位")
    private String unit;//单位
    @ApiModelProperty("包装数量")
    private Double packageNum;//包装数量
    @ApiModelProperty("包装单位")
    private String packageUnit;//包装单位
    @ApiModelProperty("交货")
    private Integer delivery;//交货
    @ApiModelProperty("询包数量")
    private Double num;//询包数量
    @ApiModelProperty("税前单价")
    private Double pretaxPrice;//税前单价
    @ApiModelProperty("税后单价")
    private Double price;//税后单价
    @ApiModelProperty("税率")
    private Double taxRate;//税率
    @ApiModelProperty("运费")
    private Double freight;//运费
    @ApiModelProperty("未税运费")
    private Double pretaxFreight;//未税运费
    @ApiModelProperty("运费税率")
    private Double taxRateFreight;//运费税率
    @ApiModelProperty("报价截止日期")
    private Date expire;//报价截止日期
    @ApiModelProperty("描述")
    private String description;//描述
    @ApiModelProperty("定标时间")
    private Date time;//定标时间
    @ApiModelProperty("供应商")
    private String vendorName;//供应商
    @ApiModelProperty("供应商ID")
    private String vendorId;//供应商ID
    @ApiModelProperty("补充澄清")
    private String clarifyTips;
    @ApiModelProperty("最大订货库存")
    private Double maximum;
    @ApiModelProperty("成本中心")
    private String costCenterName;
    @ApiModelProperty("需求人&询价人")
    private String source;
    @ApiModelProperty(value = "区域")
    private String area;
    @ApiModelProperty(value = "公司")
    private String company;
    @ApiModelProperty(value = "仓库")
    private String warehouse;
    @ApiModelProperty(value = "类型：ALL--全部、SINGLE--单次、LOOP--循环")
    private Integer type;
    @ApiModelProperty(value = "是否整单")
    private Boolean quoteTotalStrategy;

//    public static ShopVo toShopVo(GoodsPurchaseEntity goods){
//
//        return new ShopVo(goods.getId(),goods.getQuotationGoodsId(),goods.getPicketageReason(),goods.getCustomerSku(),goods.getCatalog(),goods.getBrand(),goods.getName(),
//                goods.getModel(),goods.getSpec(),goods.getUnit(),goods.getPackageNum(),goods.getPackageUnit(),goods.getDelivery(),goods.getNum(),goods.getPretaxPrice(),
//                goods.getPrice(),goods.getTaxRate(),goods.getFreight(),goods.getPretaxFreight(),goods.getTaxRateFreight(),goods.getExpire(),goods.getDescription(),goods.getTime(),
//                goods.getVendorName(),goods.getVendorId(),goods.getClarifyTips(),goods.getMaximum(),goods.getCustomerName(),goods.getQuotationGoods().getInquiryGoods().getInquiry().getMemberName(),
//                goods.getQuotationGoods().getInquiryGoods().getArea(),goods.getQuotationGoods().getInquiryGoods().getCompany(),goods.getQuotationGoods().getInquiryGoods().getWarehouse(),goods.getType(),
//                goods.getQuotationGoods().getInquiryGoods().getInquiry().getQuoteTotalStrategy());
//    }
}
